libxc: suspend: Rename, improve xc_suspend_evtchn_init
authorIan Jackson <ian.jackson@eu.citrix.com>
Tue, 26 Nov 2013 16:33:30 +0000 (16:33 +0000)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Mon, 17 Mar 2014 15:53:59 +0000 (15:53 +0000)
commitd310a8339c5e7257d046e482a0e84002aa895f3b
treeaeddb7344d8d10fe5af9b13a7073aaf207f0c8ab
parent66bff9fd492f635021b7119e8528a65ef0bc0647
libxc: suspend: Rename, improve xc_suspend_evtchn_init

xc_suspend_evtchn_init expects to eat the first event on the xce.  If
the xce is used for any other purpose then this can break.  Document
this fact and rename the function to xc_suspend_evtchn_init_exclusive.
(I haven't checked the call sites for improper shared use of the xce.)

Provide a corresponding xc_suspend_evtchn_init_sane which doesn't try
to eat an event, and instead leaves the caller the ability to
demultiplex.

Also document that xc_await_suspend needs exclusive use of the xce.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
CC: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
CC: Shriram Rajagopalan <rshriram@cs.ubc.ca>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
v3: Drop spurious addition of #include <assert.h>
tools/libxc/xc_suspend.c
tools/libxc/xenguest.h
tools/libxl/libxl_dom.c
tools/misc/xen-hptool.c
tools/python/xen/lowlevel/checkpoint/libcheckpoint.c
tools/xcutils/xc_save.c